package com.example.demo.controller;

import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author : wlg
 * @CreateTime : 2020/4/24
 * @Description :
 **/
@RestController
public class LogController {
    //注解验角色和权限
    @ResponseBody
    @RequestMapping("/querySystemLog")
    public String queryLog() {
        return "u  can queryLog !";
    }

//    @RequiresRoles("admin")//需要admin角色才可以访问
    @ResponseBody
    @RequestMapping("/queryMyUserInfo")
    public String queryNothing() {
        return "需要管理员角色才可以访问哦";
    }


}
